<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
  <head>
    <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"></meta>   
    <title><%= Easel.site.title %></title>
    <%= stylesheet_link_tag "reset", "site", "forms", "menu", :cache => "css_cache" %>
    <%= javascript_include_tag "jquery.js", "jquery-ui.js", "jquery-fx.js", 
                               "jrails.js", "jquery.treeview.pack.js", 
                               "jquery.cookie.js", "application.js",
                               :cache => "js_cache" %>
    <script type="text/javascript">
      $(function() {
        $("#tree").treeview({
              collapsed: true,
              animated: "medium",
              control:"#sidetreecontrol",
              persist: "location"
        });
      })
    </script>  
  </head>
  <body>
    <div id="site">
      <div id="header">
        <div id="logo" style="margin-top: 20px;">
          <%= Easel.site.title %>
        </div>
        <div id="left_links">
          <%= link_to('Home', home_path) %>
        </div>
        <div id="right_links">
          <% if logged_in? -%>
            <%= current_user_name %> | 
            <%= links link_to('My Account', my_account_path),
                      link_to('Logout', logout_path) %>
          <% else -%>
            <%= link_to('Login', login_path) %>
          <% end -%>
        </div>
      </div>
        
      <div id="main">
        <%= left_menu %>
        <div id="main_content">
          <%= flash_message %>
          <%= yield %>
        </div>
      </div> <!-- end main div -->
    </div>
  </body>
</html>
